In [1]:
# import zipimport
# ok_bundle = zipimport.zipimporter('./ok').load_module('client')
# ok = ok_bundle.api.notebook.Notebook('ipy.ok')
In a hosted environment such as jupyterhub:
pip install okpy>=1.8.2 --upgrade
jupyter notebook
from the root ok-client folder import zipimport
ok_bundle = zipimport.zipimporter('./ok').load_module('client')
ok = ok_bundle.api.notebook.Notebook('ipy.ok')
In [2]:
from client.api.notebook import Notebook
ok = Notebook('ipy.ok')
In [3]:
ok.auth(force=True)
The districts
and zips
data sets are Map
objects. Documentation on mapping in the datascience
package can be found at data8.org/datascience/maps.html. To view a map of California's water districts, run the cell below. Click on a district to see its description.
Question 2.1. Assign the name income_by_zipcode
to a table with just one row per ZIP code. When you group according to ZIP code, the remaining columns should be summed. In other words, for any other column such as 'N02650'
, the value of 'N02650'
in a row corresponding to ZIP code 90210 (for example) should be the sum of the values of 'N02650'
in the 6 rows of income_raw
corresponding to ZIP code 90210.
In [4]:
all_cities = [1, 2]
In [5]:
_ = ok.grade('q01')
_ = ok.submit()
Question 3.1. Some stufff
In [ ]:
_ = ok.grade('q02')
_ = ok.backup()
In [ ]:
In [ ]:
ok.submit()